<script setup lang="ts">
import {v4} from 'uuid'
import Zh_HK from 'ant-design-vue/es/locale/zh_HK'
import adminLayout from '@/components/admin-layout.vue'
import {useProjectStore} from "@/stores/projectStore.ts";
import { useRoute } from 'vue-router';

const projectStore = useProjectStore();
projectStore.loadProjects();
const nonce = v4();
const route = useRoute(); // 获取当前路由信息
</script>

<template>
  <a-config-provider :locale="Zh_HK" :csp="{ nonce: nonce }" :wave="{ disabled: false }">
    <template v-if="route.path !== '/login'">
      <adminLayout>
        <template #system-name>
          多语言管理系统
        </template>
        <router-view />
      </adminLayout>
    </template>
    <template v-else>
      <!-- <loginPage> -->
        <router-view /> <!-- 仅显示登录页面 -->
      <!-- </loginPage> -->
    </template>
  </a-config-provider>
</template>

